#[derive(Debug, Clone)]
pub enum TodoStatus {
    Pending,
    InProgress,
    Completed,
}

impl ToString for TodoStatus {
    fn to_string(&self) -> String {
        match self {
            TodoStatus::Pending => "pending".to_string(),
            TodoStatus::InProgress => "in_progress".to_string(),
            TodoStatus::Completed => "completed".to_string(),
        }
    }
}

impl From<String> for TodoStatus {
    fn from(s: String) -> Self {
        match s.as_str() {
            "pending" => TodoStatus::Pending,
            "in_progress" => TodoStatus::InProgress,
            "completed" => TodoStatus::Completed,
            _ => TodoStatus::Pending,
        }
    }
}
